home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_6.lha / 8_6 / 8_6_doalloc.c < prev    next >
Text File  |  1993-08-08  |  316b  |  16 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / allocate some space for the buffer
  6. nt streambuf::doallocate()
  7.  
  8.    base = new char[BUFSIZ];
  9.    if (!base)
  10. return EOF;
  11.  
  12.    setbuf(base, BUFSIZ);
  13.    alloc = 1;
  14.    return 0;
  15.  
  16.